package com.atguigu.guli.service.edu.feign;

import com.atguigu.guli.common.base.result.R;
import com.atguigu.guli.service.edu.feign.fallback.OssFileServiceFallBack;
import com.atguigu.guli.service.edu.feign.fallback.VodFileServiceFallBack;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author lj on 2021/2/4.
 * @version 1.0
 */
@Service
@FeignClient(value = "service-vod", fallback = VodFileServiceFallBack.class)
public interface VodFileService {
    @PostMapping("/admin/vod/media/upload")
     R uploadVideo(@RequestParam("file") MultipartFile file);

    @DeleteMapping("/admin/vod/media/remove/{vodId}")
     R removeVideo(@PathVariable String vodId);

    @DeleteMapping("/admin/vod/media/remove")
     R removeVideoByIdList(@RequestBody List<String> videoIdList);
}
